package com.example.lgseckill.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.example.lgseckill.domain.SeckillOrder;
import com.example.lgseckill.domain.UserSeckillOrderInfoVO;
import com.example.lgseckill.mapper.SeckillOrderMapper;
import com.example.lgseckill.mapper.SeckillProductMapper;
import com.example.lgseckill.service.ISeckillOrderService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * Author:e
 * Date:2021/8/16 5:12 下午
 **/
@Service
public class SeckillOrderServiceImpl extends ServiceImpl<SeckillOrderMapper, SeckillOrder> implements ISeckillOrderService {

    @Autowired
    private SeckillProductMapper seckillProductMapper;
    @Autowired
    private SeckillOrderMapper seckillOrderMapper;

    @Override
    public List<UserSeckillOrderInfoVO> seckillOrderList() {
        return seckillProductMapper.seckillOrderList();
    }

    @Override
    public List<UserSeckillOrderInfoVO> findSeckillOrderNowByUserId(Long userId) {
        return seckillOrderMapper.findSeckillOrderNowByUserId(userId);
    }
}
